.entry-form {
  margin-bottom: 0.5rem;
}

.entry-form textarea {
  flex-grow: 1;
  width: 100%;
  padding: 8px;
  font: inherit;
}

.entry-form label {
  display: none;
}

.entry-form h4 {
  margin: 0;
}

.entry-form .amount {
  width: 220px;
}

.entry-form button,
.entry-form input {
  margin: 0;
}

.entry-form > * + * {
  margin-top: 0.5rem;
}

.entry-form .fieldset > * + * {
  margin-left: 0.5rem;
}

.entry-form input[name="flag"] {
  width: 1.5em;
  padding-right: 2px;
  padding-left: 2px;
  text-align: center;
}

.entry-form .account,
.entry-form input[name="narration"] {
  flex-basis: 200px;
  flex-grow: 1;
  min-width: 20em;
}

.entry-form .payee {
  flex-basis: 100px;
  flex-grow: 1;
  min-width: 10em;
}

.entry-form input.metadata-value {
  flex-grow: 1;
  max-width: 15em;
}

.balance .currency {
  width: 6em;
}

.entry-form input.metadata-key {
  width: 10em;
}

.entry-form .remove-fieldset {
  opacity: 0;
}

.entry-form .fieldset:hover .remove-fieldset {
  opacity: 1;
}

.entry-form .posting .add-row {
  display: none;
}

.entry-form .posting:last-child .add-row {
  display: initial;
}

.entry-form .posting {
  padding-left: 50px;
  cursor: grab;
}

.entry-form .posting > * {
  cursor: initial;
}

.entry-form .posting:last-child .amount {
  width: 192px;
}

.entry-form .metadata {
  padding-left: 56px;
  font-size: 0.8em;
}

.ingest-row .source pre {
  font-size: 0.9em;
  white-space: pre-wrap;
}

.ingest-row.duplicate {
  opacity: 0.5;
}

@media (max-width: 767px) {
  .entry-form.transaction label {
    display: initial;
    width: 100%;
  }

  .entry-form.transaction .fieldset input {
    height: 35px;
    margin: 0 0.5em 0.5em 0;
  }

  .entry-form.transaction .metadata,
  .entry-form.transaction .posting {
    padding-left: 0;
  }
}
